perm filename MILWEY.STR[LSP,JRA] blob sn#103034 filedate 1974-05-16 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	SOURCE
C00004 ENDMK
C⊗;
SOURCE

wfse	::= _N
	::= _E

_E	::= struct[oper:op;arg1:wfse;arg2:wfse]

wfs	::= _A
	::= _C
	::= _W
	::= _CM

_A	::= struct[lhs:_N;rhs:wfse]

_C	::= struct[if:wfse;then:wfs;else:wfs]

_W	::= struct[test:wfse;body:wfs]

_CM	::= struct[first:wfs;second:wfs]

**notes: _CM seems wrong
|	rather:
|	 wfp	::= seq[wfs]
|	 _C, _W involve wfp rather than wfs; and _CM goes away
| so we will deviate accordingly and see where we get screwed.
**

SEMANTICS
mse[e:wfse;sv:state]value??
 generic(e)
	[_N] => sv(e)
	[_E(o,a,b)] => apply(o,mse(a,sv),mse(b,sv))
 end

ms[p:wfs]
 generic(p)
	[_A(l,r)] => λ[[sv:state;m:_N]l=m → mse(r,sv),sv(m)]
	[_C(i,t,e)] => scond(i,t,e)
	[_W(t,b)] => swhile(t,b)
 end

mp[p:wfp] ??state??
 on(p;ε,ms)

** i.e. ms(pn,ms(pn-1, ... ms(p1,ε) ...)


scond[i:wfse;t:wfp;e:wfp] state
 mse(i) → msp(t),msp(e)

swhile[t:wfse;b:wfp] state